{% comment %}
/* Copyright 2009 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
{% endcomment %}
{% extends 'base.html' %}
{% block content %}
{% if wups_no_posts %}
Sorry, no more posts!
{% else %}
{% for post in posts %}
<p>
<div class="post-title">
  <a href="/{{post.publish_date|date:"Y/m/d"}}/{{post.path|urlencode}}">{{post.title}}</a>
</div>
{% if blog.enable_postinfo %}
<div class="post-info">
  <span class="post-publish">{{post.publish_date|date:"F j, Y" }}</span> -
  <span class="post-author">{{post.author.nickname}}</span>
  {% if blog.enable_comments %} -
  <span class="post-comments">
    <a
    href="/{{post.publish_date|date:"Y/m/d"}}/{{post.path|urlencode}}#comments">
      Comments ({{post.comment_count}})</a>
  </span>
  {% endif %}
</div>
{% endif %}
<div class="post-body">
  {% if blog.partial_posts %}
  {{post.body|truncatewords:100}}
  (<a href="/{{post.publish_date|date:"Y/m/d"}}/{{post.path|urlencode}}">read
    more</a>)
  {% else %}
    {{post.body}}
  {% endif %}
</div>
</p>
{% endfor %}
{% endif %}

<div id='more-posts'>
{% if older_posts %}
<span id="older-posts">
  <a href="/?page={{older_posts}}">older posts &gt;&gt;</a>
</span>
{% endif %}
{% if newer_posts %}
<span id="newer-posts">
  <a href="/?page={{newer_posts}}">&lt;&lt; newer posts</a>
</span>
{% endif %}
</div>
{% endblock %}